1. Field
Various configurations pertain to communications and, in particular, to a method for authenticating messages.
2. Background
A message authentication code (MAC) is a short piece of information accompanying or embedded within a transmitted message, and is a common feature of many communication protocols. The purpose of a MAC is to protect both a message's integrity as well as its authenticity by allowing verifiers (who also possess the secret key) to detect any changes to the message and/or the MAC. A typical MAC algorithm accepts as input a secret key and an arbitrary-length message and calculates the resulting MAC. When a message is received, its MAC is calculated by the receiver and checked against the transmitted MAC. If the two MAC match, the message is processed, otherwise the message is (typically) discarded.
A message may be broken into transmission units (TUs) when in transit. This typically occurs when the maximum transmission unit (MTU) of a communication link is smaller than the length of the original message. In some circumstances, the component TUs of a message may arrive out of order at the receiver.
Typically, an entire message has be present in order to complete the calculation of a conventional MAC. If the message has been broken into TUs, it has to first be reassembled by the receiver before a MAC can be calculated. For instance, a data packet that has been decomposed into transmission units or fragments by a router, or into frames by a link layer, has to be reassembled before its MAC can be calculated.
A MAC calculation is a relatively expensive and time consuming process. It is therefore desirable to begin MAC calculations on a message as soon as possible in order to minimize latency and maximize throughput. It is often also desirable to relegate such calculations to specialized hardware.
A conventional MAC is calculated over the entire message by processing it from start to end. If the message has been broken into multiple transmission units (TUs) (e.g., packets, segments, etc.), and the TUs arrive out of order, then the receiver will possess some TUs over which no MAC calculations can be performed until further TUs arrive. In a worst case scenario, a receiver may have most of the message but is unable to initiate any MAC calculations because one or a few TUs for the message have not been received. If TUs could be processed independently in order to calculate the MAC, then significant efficiencies may be gained.
Furthermore, in the case where TUs may arrive out of order, the receiving hardware typically passes the TUs to general purpose processing elements for reassembly and MAC calculation. If TUs could be processed independently (e.g., out of sequence and/or without waiting for all TUs for a particular message to arrive), then these calculations could be implemented directly in the receiving hardware.